package com.itheima.service.impl;

import com.itheima.dao.UserDao;
import com.itheima.domain.Student;
import com.itheima.domain.User;
import com.itheima.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;


    @Override
    public User login(User user) {
        return userDao.login(user);
    }

    @Override
    public void addStudent(Student student) {
        userDao.addStudent(student);
    }

    @Override
    public void deleteStudent(String id) {
        userDao.deleteStudent(id);
    }

    @Override
    public void updateStudent(Student student) {
        userDao.updateStudent(student);
    }
}
